# Compiler is G++
CXX = g++

#MUDLib directory
MUDLIBDIR = ../Libraries
SOCKETLIBDIR = $(MUDLIBDIR)/SocketLib
THREADLIBDIR = $(MUDLIBDIR)/ThreadLib
BASICLIBDIR  = $(MUDLIBDIR)/BasicLib
SIMPLEMUDDIR = ./SimpleMUD

# libraries
LIBS = -lpthread

# flags
CFLAGS = -I$(MUDLIBDIR)

libs: $(wildcard *.cpp)
	$(CXX) $(CFLAGS) $(SOCKETLIBDIR)/*.cpp -c;
	$(CXX) $(CFLAGS) $(THREADLIBDIR)/*.cpp -c;
	$(CXX) $(CFLAGS) $(BASICLIBDIR)/*.cpp -c;
	$(CXX) $(CFLAGS) $(SIMPLEMUDDIR)/*.cpp -c;

simplemud: $(wildcard *.cpp)
	$(CXX) $(CFLAGS) *.cpp -c;
	$(CXX) $(CFLAGS) $(SIMPLEMUDDIR)/*.cpp -c;

main: $(wildcard *.cpp)
	$(CXX) $(CFLAGS) *.cpp -c;

link: $(wildcard *.cpp)
	$(CXX) $(CFLAGS)  $(LIBS) -o a.out SimpleMUD.o BasicLibRandom.o EnemyDatabase.o ItemDatabase.o RoomDatabase.o SocketLibErrors.o  StoreDatabase.o BasicLibString.o  Enemy.o   Logon.o           Room.o           SocketLibSocket.o  Telnet.o BasicLibTime.o     GameLoop.o       PlayerDatabase.o  SimpleMUDLogs.o  SocketLibSystem.o  ThreadLibFunctions.o DatabasePointer.o  Game.o           Player.o             SocketSet.o        Train.o
